#!/bin/bash


gnatmake benchmark_*.adb &> /dev/null

function benchmark_hash_bete {
  echo ""
  echo "Lancement de benchmark_hash_bete..."
  ./benchmark_hash_bete
}

function benchmark_hash_biz {
  echo ""
  echo "Lancement de benchmark_hash_biz..."
  ./benchmark_hash_biz
}

function benchmark_hash_somme {
  echo ""
  echo "Lancement de benchmark_hash_somme..."
  ./benchmark_hash_somme
}

function benchmark_hash_3der {
  echo ""
  echo "Lancement de benchmark_hash_3der..."
  ./benchmark_hash_3der
}

function benchmark_hash_3prem {
  echo ""
  echo "Lancement de benchmark_hash_3prem..."
  ./benchmark_hash_3prem
}

echo ""

echo "Lancement des benchmarks sur un dictionnaire de 100000 éléments..."

rm -f *~
rm -f *.ali
rm -f *.o

benchmark_hash_bete &

pidbete=$!

benchmark_hash_biz &

pidbiz=$!

benchmark_hash_somme &

pidsomme=$!

benchmark_hash_3der &

pid3der=$!

benchmark_hash_3prem &

pid3prem=$!

wait $pidbete $pidbiz $pidsomme $pid3der $pid3prem

rm -f *~
rm -f *.ali
rm -f *.o
rm -f benchmark_hash_bete benchmark_hash_somme benchmark_hash_biz benchmark_hash_3der benchmark_hash_3prem

